import pytesseract
from PIL import Image
import time
for i in range(1):
        #print(time.time())
        im1 = Image.open('D:\\python_file\\monkeyrunner\\test4.png')
        code1 = pytesseract.image_to_string(im1,lang="chi_sim")
        #print(time.time())
        f=open("D:\\python_file\\ocr_test\\result.txt","a")
        f.write("%s"%code1+','+'\n')
        f.close()
        print(code1)
'''   
print(code1.encode('utf-8'))

if code1.encode('utf-8')=='王青96区'.encode('utf-8'):
    print("1")
else:
    print("2")



if code1==b'\xe7\x8e\x8b\xe9\x9d\x9296\xe5\x8c\xba':
    print("1")
else:
    print("2")
'''
